home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / pascal / ptrp10.zip / TEST12.TRP < prev    next >
Text File  |  1994-05-17  |  568b  |  28 lines

  1. procedure main;
  2. var
  3.         n : longint;
  4. endvar
  5. global  
  6.         p : longint;
  7. endvar
  8.         write("Enter Value : ")
  9.         readln(n);
  10.         writeln("n = ", n);
  11.         calcIt(n);
  12.         writeln("2 * n = ", p)
  13.         writeln('4 * n = ', retTest(n))
  14.         writeln('10* n = ', funcAssignTest(n))
  15. endproc
  16.  
  17. function calcIt(a : longint) : longint;
  18.         p := 2 * a;
  19. endproc
  20.  
  21. function retTest(a : longint) : longint;
  22.         return 4 * a;
  23. endproc
  24.  
  25. function funcAssignTest(a : longint) : longint;
  26.         funcAssignTest := 10 * a;
  27. endproc
  28.